package com.wanglibao.woodtrade.woodtrade.model;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

import java.util.List;

/**
 * 木材分类 一级
 * Created by lugg on 2016/5/10.
 */
@DatabaseTable
public class WoodType {
    public WoodType(String id, String name) {
        this.id = id;
        this.name = name;
    }

    public WoodType() {
    }

    @DatabaseField(id = true)
    public String id;

    @DatabaseField
    public String name;

    @DatabaseField
    public String sum;

    public static String[] arrayListTurnArray(List<WoodType> woodTypeList){
        String[] strings = new String[woodTypeList.size()];
        for (int i = 0; i < strings.length; i++){
            strings[i] = woodTypeList.get(i).name;
        }
        return strings;
    }
}
